<?php

namespace App\Admin\show;

use App\Models\GrGood;
use App\Models\GrIntegral;
use Dcat\Admin\Support\LazyRenderable;
use Dcat\Admin\Widgets\Table;

class goods extends LazyRenderable
{

    public function render()
    {
        $goods_id=$this->goods_id;
        $data=GrGood::where('goods_id',$goods_id)->get(['goods_id', 'goods_name', 'stock_total','goods_now_price']);
        $data=$data->toArray();
        $titles = [
            '商品id',
            '商品名称',
            '商品库存',
            '商品价格',
        ];

        return Table::make($titles, $data);
    }


}
